package cn.com.yiqi.wsc.portal.controller.check;

import cn.com.yiqi.wsc.common.Result;
import cn.com.yiqi.wsc.entity.check.Check;
import cn.com.yiqi.wsc.service.check.CheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 杨贵森
 * @ClassName:CheckController
 * @Title: CheckController
 * @Description: TODO
 * @date 2017/3/23
 */
@Controller
@RequestMapping("/check")
public class CheckController {

    @Autowired
    CheckService checkService;

    @RequestMapping("/getCheckInfo")
    @ResponseBody
    public Result getCheckInfo(@RequestBody Check check){
        return  checkService.selectOneCheck(check);

    }
    @RequestMapping("/addCheck")
    @ResponseBody
    public Result addCheck(@RequestBody Check check){
        return  checkService.insertCheck(check);
    }


}
